package com.mmall.service;

import com.mmall.common.ServerResponse;
import com.mmall.pojo.User;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface IUserService {
    ServerResponse<User> login(String username, String password);

    ServerResponse register(User user);

    ServerResponse checkValid(String inform, String type);

    ServerResponse getUserQuestion(String username);

    ServerResponse checkAnswer(String username, String question, String answer);

    ServerResponse forgetResetPassword(String username, String newPassword, String forgetToken);

    ServerResponse restPassword(User user, String newPassword, String oldPassword);

    ServerResponse updateUserInformation(User user);

    ServerResponse checkAdminRole(HttpSession session);

    ServerResponse<User> manageLogin(String username, String password);

    ServerResponse<List<User>> list(Integer pageNum, Integer pageSize);
}
